<!DOCTYPE html>
<html>
	<head>
		<meta Charset="UTF-8"/>
		<title>个人信息H5</title>
		<script src="js/jquery-1.7.2.js"></script>
	</head>

	<body>
		<h1>个人信息</h1>
		<p id="name"></p>
		<p id="sex"></p>
	</body>

	<script>
		$(document).ready(init);

		//init
		function init()
		{
			$.post(
				"../service/getPlayerInfo.php",
				{userId: 10086},
				onGetPlayerInfo
			)
		}

		//---事件处理: 获取用户信息----
		function onGetPlayerInfo(data)
		{
			var retObj = JSON.parse(data);
			$("#name").html(retObj.name);
			$("#sex").html(retObj.sex);
		}



	</script>
</html>